package com.yn.xr.front.news.service;

import java.util.List;
import java.util.Map;

import com.yn.xr.common.page.Page;
import com.yn.xr.news.mode.NewsComment;
import com.yn.xr.news.mode.NewsCommentRevert;

public interface NewsCommentService {
	/**
	 * 
	 * @function: 添加新闻评论或回复
	 * @param type
	 *            是评论类型还是回复类型
	 * @param userId
	 *            用户ID
	 * @param newsIdOrcommentId
	 *            新闻唯一标识或评论唯一标识
	 * @param words
	 *            内容
	 * @param hxaccName
	 *            惠信号
	 * @return
	 * @throws Exception
	 *             boolean
	 * @exception
	 * @author: 黄伟
	 * @since 1.0.0
	 */
	public Map<String, Object> addCommentOrRevert(String type, Long userId,
			Integer newsIdOrcommentId, String words, String hxaccName, String ip)
			throws Exception;

	/**
	 * @function: 获取评论分页
	 * @param pageNum
	 *            第几页
	 * @param pageSize
	 *            每页的记录数
	 * @param newsId
	 *            新闻id
	 * @return
	 * @throws Exception
	 *             Page<NewsComment>
	 * @exception
	 * @author:yangjiao
	 * @since 1.0.0
	 */
	public Page<NewsComment> queryCommentPage(String hql ,Object[] queryParams , int pageNum, int pageSize ) throws Exception;

	/**
	 * @function: 获取评论回复列表
	 * @param newsId
	 *            新闻id
	 * @param commentId
	 *            评论id
	 * @return
	 * @throws Exception
	 *             Page<NewsCommentRevert>
	 * @exception
	 * @author:yangjiao
	 * @since 1.0.0
	 */
	public List<NewsCommentRevert> queryCommentRevertList(Integer newsId,
			Integer commentId, Short status) throws Exception;

}
